package com.itheima.reggie.service;

import com.itheima.reggie.dto.DishDto;
import com.itheima.reggie.entity.Dish;
import com.itheima.reggie.entity.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface DishService {
    //分页展示
    Page<Dish> selectAllByPage(Integer page, Integer pageSize, String name);
    //修改菜品
    Boolean update(Dish dish);

    Dish selectById(Long ids);

    Boolean selectCountByCategoryId(Long categoryId);
    //修改菜品
    Boolean updateAll(DishDto dishDto);
    //多选删除
    Boolean deleteByIds(Long[] ids);
    //批量启售 停售
    Boolean updateStatus(Integer status,Long[] ids);
    //添加菜品
    Boolean add(DishDto dishDto);
    //通过categoryId查找菜品
    List<Dish> findByCategoryId(Long categoryId);
    //通过categoryId查找菜品与口味,返回DishDto
    List<DishDto> findByCategoryIdAndStatus(Long categoryId,Integer status);
}
